<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/6/14 0014
  Time: 下午 9:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <title>农场</title>

    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="css/app.css" />
    <link rel="stylesheet" type="text/css" href="css/farm.css">
</head>
<body>

<div id="header">
    <form method="POST" action="#">
        <span id="image" class="glyphicon glyphicon-search" aria-hidden="true"></span>
        <input id="input" type="text" name="keywords">
        <img src="img/yuyin.png" id="yuyin">
        <span class="glyphicon glyphicon-qrcode" aria-hidden="true"></span>
    </form>
</div>

<!-- 轮播图 -->

<div id="slideshow">
    <img id="imge" src="img/farm_1.jpg" width="100%">
    <ul class="num"></ul>
</div>
<div id="middle">
    <table>
        <tr>
            <td><a href="#"><img src="img/grow_diary.png"></a></td>
            <td><a href="#"><img src="img/my_henhouse.png"></a></td>
            <td><a href="#"><img src="img/my_vegetable.png"></a></td>
            <td><a href="#"><img src="img/my_profit.png"></a></td>
        </tr>
    </table>
    <div id="middle_division">
        <img src="img/middle.png" width="100%">
    </div>
</div>

<div id="bottom_img">
    <img id="nearby_img" src="img/nearby.png">
    <span id="nearby">附近推荐</span>
    <span id="nearby_price">20</span>
    <img id="img_1" src="img/farm_1.jpg" width="100%"  height="200">
</div>

<div id="bottom">
    <div class="bottom_button">
        <a href="/index"><img id="img1" src="img/1_ago.png"></a>
        <a href="farm.jsp"><img id="img2" src="img/2.png"></a>
        <a href="friendCirle.jsp"><img id="img3" src="img/3_ago.png"></a>
        <a href="user.jsp"><img id="img4" src="img/4_ago.png"></a>
    </div>
    <a href="/index" id="txt1">首页</a>
    <a href="farm.jsp" id="txt2">农场</a>
    <a href="friendCirle.jsp" id="txt3">朋友圈</a>
    <a href="user.jsp" id="txt4">个人中心</a>
</div>

</body>

<script type="text/javascript">
    var img = new Array("farm_2.jpg","farm_3.jpg","farm_4.jpg");
    var foot=0;
    function setpic(){
        var imgelement=document.getElementById("imge");
        if(foot>=img.length){
            foot=0;
        }
        imgelement.src="img/"+img[foot++];
        setTimeout(setpic,2000);
    }
    setpic();
</script>
</html>


